<template>
  <view class="category">
    <view class="ul">
      <view v-for="(item, index) in category.list" :key="index" class="li">
        <image :src="item.icon" mode=""></image>
        <text>{{ item.title }}</text>
      </view>
    </view>
  </view>
</template>

<script lang="ts" setup>
import { reactive } from 'vue'

const category = reactive({
  list: [
    {
      id: 1,
      title: '快递待取',
      icon: 'http://zxc.ruanjian211.top/icon/Snipaste_2023-03-21_21-16-38.png',
    },
    {
      id: 2,
      title: '跑腿',
      icon: 'http://zxc.ruanjian211.top/icon/Snipaste_2023-03-21_21-17-16.png',
    },
    {
      id: 3,
      title: '特惠影票',
      icon: 'http://zxc.ruanjian211.top/icon/Snipaste_2023-03-21_21-18-27.png',
    },
  ],
})
</script>

<style lang="scss" scoped>
.category {
  width: 100%;
  height: 185rpx;

  background-color: #fff;
  border-radius: 20rpx;

  .ul {
    width: 100%;
    box-sizing: border-box;
    padding: 20rpx;
    display: flex;
    justify-content: space-between;

    .li {
      width: 32%;
      height: 100%;
      display: flex;
      flex-direction: column;
      align-items: center;
      justify-content: center;

      image {
        width: 90rpx;
        height: 90rpx;
      }

      > text {
        font-size: 0.75rem;
        margin-top: 10rpx;
      }
    }
  }
}
</style>
